﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Threading.Tasks;

namespace MaximPortal.Model
{
    public class AddMottoRuleModel
    {
        [Display(Name = "规则Id")]
        public string Id { get; set; }

        [Required]
        [Display(Name = "规则名称")]
        [StringLength(30, ErrorMessage = "{0}必须至少包含 {2} 个字符", MinimumLength = 2)]
        public string Rule_Name { get; set; }

        [Required]
        [Display(Name = "开始时间")]
        [Range(typeof(DateTime), "1950-01-01", "3000-12-31", ErrorMessage = "{0}的范围是{1}到{2}")]
        public DateTime StartDate { get; set; }
        [Required]
        [Display(Name = "结束时间")]
        [Range(typeof(DateTime),"1950-01-01","3000-12-31",ErrorMessage = "{0}的范围是{1}到{2}")]
        public DateTime EndDate { get; set; }

        [Required]
        [Display(Name = "规则Json")]
        public string Rule_Json { get; set; }

        [Required]
        [Display(Name = "允许自动匹配")]
        public int UseDefault_Rule { get; set; }
    }
}
